wrap long lines in verbatim elements, such as screen. (#1027)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Tue, 7 Mar 2023 00:27:02 +0000 (17:27 -0700)
committerGitHub <noreply@github.com>
Tue, 7 Mar 2023 00:27:02 +0000 (17:27 -0700)
The use of inline.boldmonoseq on verbatim elements such as screen
results in a lose of the line endings. This makes it impossible to
differentiate items in what might have better been a list.  However,
if the line in the screen element is too long it will be trucated.
Use the monospace.verbatim.property wrap-option to wrap any such lines.

An example that illustrates the problems is the list of keywords in the
unicsv format.

xmldoc/babelpdf.xsl

index 232da9d79452be0d282efee97635cafae0a04f27..c80ec321bf54b36ee2d154c852b620105ef844b1 100644 (file)
     <xsl:call-template name="inline.boldmonoseq"/>
   </fo:block>
 </xsl:template>
-<!-- Sometimes we use userinput and sometimes screen. Format both. -->
-<xsl:template match="db:screen">
-  <fo:block background-color="#e5E9EB" padding="4pt"
-               break-after="auto" border="1pt dashed #000000">
-    <xsl:call-template name="inline.boldmonoseq"/>
-  </fo:block>
-</xsl:template>
+
+<!-- Wrap any long lines in verbatim elements, which presumably use monospace.
+     This is preferrable to truncating the lines, but manually breaking the line
+     allows for the appropriate level of indent and control over where the break
+     is. -->
+<xsl:attribute-set name="monospace.verbatim.properties">
+    <xsl:attribute name="wrap-option">wrap</xsl:attribute>
+</xsl:attribute-set>
 
 <!-- This template is used to get rid of a lot of warnings we were getting
      from fop due to the fact that it doesn't support table-layout="auto".